package com.wx.gof.pattern.structural.adapter.mvc;

/**
 * @ClassName SimpleControllerAdapter
 * @Author wx
 * @Description 简单类型的Controller适配器
 * @Date 2018-12-08-22:12
 */
public class SimpleControllerAdapter implements IAdapterTarget{

    private SimpleController simpleController;

    @Override
    public boolean validation(Object adapter) {
        if(adapter instanceof SimpleController){
            this.simpleController = (SimpleController) adapter;
            return true;
        }
        return false;
    }


    @Override
    public void run() {
        System.out.println("根据请求内容做反射操作。。。。");
        this.simpleController.simpleRequest();
    }
}
